<?php 
global $header;
global $footer;
global $control;
global $message;
global $glossary, $terms, $pageNav, $count, $query;

global $featureManager;
$header['title'] = 'Search result in '.$glossary['abbr'] != ""?$glossary['abbr']:$glossary['title'];
$header['head'] = '';
$header['intro'] = '<em class="title">'.$glossary['title'].'</em>';
$header['hasToolBar'] = TRUE;
$featureManager->apply("com.yizin.platform.site.header", $header);
$featureManager->apply("com.yizin.platform.site.footer", $footer);
$featureManager->apply("com.yizin.platform.site.control", $control);

?>
<?= $header['html']?>
<div class="container-L">
	<?=$control['html']?>
</div>
<div class="container-R">
	<?=Utils::showMessage($message)?>
	<?=Utils::loadSegment(dirname(__FILE__)."/segments/_s_glossary_toolbar_.php")?>
	<?=Utils::loadSegment(dirname(__FILE__)."/segments/_s_glossary_search_.php")?>
	<?=Utils::loadSegment(dirname(__FILE__)."/segments/_s_glossary_category_.php")?>
	<p class="meta"><strong><?=$count?></strong> results contain "<strong><?=$query?></strong>"</p>
	<div class="vspacing-short"></div>
	<?php if($terms) {?>
	<table class="terms">
		<?php foreach($terms as $term) {?>
		<tr>
			<th>
				<em class="term"><?=$term['term']?></em>
			</th>
			<td>
				<p class="definition"><?=$term['definition']?></p>
			</td>
		</tr>
		<?php }?>
	</table>
	<?php }?>
	<?=$pageNav?>
</div>
<?= $footer['html']?>
